home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / cstdio.arc / SRC.ARC / CREAT.A < prev    next >
Text File  |  1985-05-17  |  477b  |  28 lines

  1. ;    creat.a - create a new file.
  2. ;    (C) Copyright 1984, 1985 Gregory R. Mansfield - All Rights Reserved.
  3. ;    G. R. Mansfield.  84/06/22.
  4. ;    Ver 1.0-5517.
  5.  
  6.  
  7.     include    "include/msdos.ah"
  8.     dseg
  9.     public    errno_
  10.  
  11.     cseg
  12.     public    creat_
  13.  
  14.  
  15. ;    int creat(fd, att)
  16. ;    int fd;
  17. ;    int att;
  18.  
  19. creat_:    mov    bx,sp
  20.     mov    cx,[bx+4]    ; attributes
  21.     mov    dx,[bx+2]    ; path name pointer
  22.     mov    ah,FR_CRF    ; create a file
  23.     int    I_FCN
  24.     jnb    crt1        ; if no error
  25.     mov    errno_,ax
  26.     mov    ax,-1
  27. crt1:    ret
  28.